package com.freesky.biz.icbc.mapper;

import com.freesky.biz.icbc.domain.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IntegralPartnerMapper {

    /**
     * 领取记录
     * @param entity
     * @return
     */
    List<TIntegralPartner> findList(TIntegralPartner entity);

    /**
     * 合伙人用户列表
     * @param entity
     * @return
     */
    List<TIntegralPartnerUser> findUserList(TIntegralPartnerUser entity);

    /**
     * 积分合伙人（金币奖励记录）
     * @param entity
     * @return
     */
    List<TIntegralPartnerRecord> findRecordList(TIntegralPartnerRecord entity);

    List<TIntegralExchange> findPointList();
    TIntegralPartnerUser getOnePartnerUser(@Param("mobile") String mobile,@Param("openId") String openId);
    String getBindPartnerUserById(@Param("bindPartnerId") String bindPartnerId);
    int addPartnerRecord(TIntegralPartnerRecord entity);
    int updatePointPartnerProcessed(@Param("id") String id,@Param("processed") String processed);

    //汇总金币
    int updatePartnerUserTotalAmt();
}
